var count;
count = 0;
function drawTable(tdClass) {
	count += 1;
	var alfabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"];
	document.write('<table class="gameGrid">');
	document.write("<tr><th></th>");
	for (k in alfabet) {
		document.write("<th>" + alfabet[k] + "</th>");
	}
	document.write("</tr>");
	for (var j = 0; j < 10; j++) {
		document.write("<tr><th>" + (j + 1) + "</th>");
		for (var i = 0; i < 10; i++) {
			document.write("<td id='" + count.toString() + j.toString() + i.toString() + "'" + " class='" + tdClass + " shootable'><img src='images/explosion.png' alt='Explosion' class='explosion' /><img src='images/dead.png' alt='Wrecked' class='wrecked' /></td>");
		}
		document.write("</tr>");
	}
	document.write("</table>");
}

function drawReplayTable(tdClass) {
	count += 1;
	var alfabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J"];
	document.write('<table class="gameGrid">');
	document.write("<tr><th></th>");
	for (k in alfabet) {
		document.write("<th>" + alfabet[k] + "</th>");
	}
	document.write("</tr>");
	for (var j = 0; j < 10; j++) {
		document.write("<tr><th>" + (j + 1) + "</th>");
		for (var i = 0; i < 10; i++) {
			document.write("<td id='" + count.toString() + j.toString() + i.toString() + "'" + " class='" + tdClass + "'><img src='images/explosion.png' alt='Explosion' class='explosion' /><img src='images/dead.png' alt='Wrecked' class='wrecked' /></td>");
		}
		document.write("</tr>");
	}
	document.write("</table>");
}